import {
	createSSRApp
} from "vue";
import uviewPlus, { setConfig } from 'uview-plus'
import store from "./store";
import App from "./App.vue";
// 全局组件
import TabBar from '@/components/tabbar/Tabbar.vue';
import Login from '@/components/login/index.vue';
import Price from '@/components/price/index.vue';
import Empty from '@/components/Empty/index.vue';
import HintDialog from "@/components/hintDialog/index.vue";
import NavBar from "@/components/navBar/index.vue";
export function createApp() {
	const app = createSSRApp(App);
	app.component('TabBar', TabBar)
	app.component('Login', Login)
	app.component('Price', Price)
	app.component('Empty', Empty)
	app.component('HintDialog', HintDialog)
	app.component('NavBar', NavBar)
	app.use(store);
	setConfig({
		// 修改$u.config对象的属性
		config: {
			// 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
			unit: 'rpx'
		}
	})
	app.use(uviewPlus)
	return {
		app,
	};
}
